package org.example.memora.entity;

import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.annotation.Id;

import java.time.LocalDateTime;

//@Data
//@Document("chat_messages")
//public class ChatMessageDocument {
//    @Id
//    private String id;
//
//    private String memoryId;
//    private String userId;
//    private String role;    // "USER" / "AI"
//    private String content;
//    private LocalDateTime createTime;
//}


@Data
@Document("chat_message")
public class ChatMessageDocument {

    @Id
    private String id;

    private String memoryId;
    private String userId;
    private String type;
    // "USER" / "AI" / "SYSTEM"
    private String text;
    // 消息纯文本内容
    private LocalDateTime createTime;
    //private String toolName;
    //private String toolMessageText;
    // 对 Tool 的返回值 text 单独存储

}



